Passed
Push — develop ( 9011bf...5a7fee )
by Endre
03:38
created

Presenter.present   A

Complexity

Conditions 1

Size

Total Lines 6
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 6
dl 0
loc 6
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
import React from 'react';
2
import {IObserver} from '../../../Observer/Observer';
3
import Model from './Model';
4
5
export default class Presenter {
6
  moduleState: IObserver<typeof React.Component | null>;
7
8
  constructor(moduleState: IObserver<typeof React.Component | null>) {
9 3
    this.moduleState = moduleState;
10
  }
11
12
  present() {
13 1
    const model: Model = new Model();
14 1
    model.module = this.moduleState.value;
15
16 1
    return model;
17
  }
18
}